package com.wanmait.jd.controller;

import com.wanmait.jd.dao.ProvinceDAO;
import com.wanmait.jd.vo.Province;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Controller
public class AddressController {
    @GetMapping("address")
    public String address(Model model) {
        //查询数据
        ProvinceDAO provinceDAO = new ProvinceDAO();
        List<Province> provincesList = provinceDAO.findAll();
        model.addAttribute("provincesList", provincesList);

        return "address";
    }
}
